#include "HpBar.h"

HpBar::HpBar(int _posX, int _posY, int _frameX, int _frameY, int _width, int _height, std::string _fileName)
	: ScalingBar(_posX, _posY, _frameX, _frameY, _width, _height, _fileName)
{

}

HpBar::HpBar(int _posX, int _posY, int _frameX, int _frameY, int _width, int _height, std::string _fileName, Pokemon* _pokemon,SDLScene* _scene)
	: ScalingBar(_posX, _posY, _frameX, _frameY, _width, _height, _fileName, _pokemon, _scene)
{
	SetPokemon(_pokemon);
}

void HpBar::SetPokemon(Pokemon* const _pokemon)
{
	m_Pokemon = _pokemon;
	m_Current = m_Pokemon->GetCurrentHP();
	m_Max = m_Pokemon->GetMaxHP();
}

void HpBar::Update()
{
	m_Current = m_Pokemon->GetCurrentHP();
	m_Max = m_Pokemon->GetMaxHP();

	ScalingBar::Update();
}